<html>
<#setting datetime_format="yyyy-MM-dd HH:mm:ss"/>

<title>仓门测试结果</title>

<body>

<#assign tempDate=0/>

<#assign tempBgcolor="#ffffff"/>

<h3>仓门测试结果-数据列表：${cabinetId}</h3>

<table border="1px solid #8968CD" style="border-collapse: collapse;">
    <tr bgcolor="#a9a9a9">
        <th style="padding: 10px">日期</th>
        <th style="padding: 10px">电柜编号</th>
        <th style="padding: 10px">仓门号</th>
        <th style="padding: 10px">测试开始时间</th>
        <th style="padding: 10px">测试结束时间</th>
        <th style="padding: 10px">测试总次数(开)</th>
        <th style="padding: 10px">成功次数(开)</th>
        <th style="padding: 10px">失败次数(开)</th>

        <th style="padding: 10px">测试总次数(关)</th>
        <th style="padding: 10px">成功次数(关)</th>
        <th style="padding: 10px">失败次数(关)</th>
    </tr>

    <#list resultBeanList as resultBean>

        <#assign currentDate = resultBean.testStartTime/(24*60*60*1000) />

        <#if (tempDate) == (currentDate)>

        <#else>
            <#if tempBgcolor == "#ffffff">
                <#assign tempBgcolor = "#e6e6fa"/>
            <#else>
                <#assign tempBgcolor = "#ffffff"/>
            </#if>

            <#assign tempDate = currentDate />
        </#if>


    <tr style="padding: 10px" bgcolor=${tempBgcolor}>

        <td style="padding: 10px">
            ${resultBean.testStartTime?number_to_date!}
        </td>

        <td style="padding: 10px">
            ${resultBean.cabinetId!"暂无编号"}
        </td>

        <td style="padding: 10px">
            ${resultBean.doorIndex+1}
        </td>

        <td style="padding: 10px">
            ${resultBean.testStartTime?number_to_datetime!}
        </td>

        <td style="padding: 10px">
            ${resultBean.testEndTime?number_to_datetime!}
        </td>

        <td style="padding: 10px">
            ${resultBean.countOpenTest}
        </td>

        <td style="padding: 10px">
            ${resultBean.countOpenSuccess}
        </td>

        <td style="padding: 10px">
            ${resultBean.countOpenFail}
        </td>

        <td style="padding: 10px">
            ${resultBean.countCloseTest}
        </td>

        <td style="padding: 10px">
            ${resultBean.countCloseSuccess}
        </td>

        <td style="padding: 10px">
            ${resultBean.countCloseFail}
        </td>

    </tr>
    </#list>
</table>


</body>
</html>